1. Field of the Invention
The present invention relates to a method of prevention of dangling transaction occurrance using a terminated transaction process technique at redo step and, in particular, to a recovery function from a system failure such as a power failure and a media failure such as a disk crash at a transaction processing system of a plurality of user environment.
The present invention is applied in carrying out a checkpoint to reduce an amount of work required for failure recovery, and particularly to a checkpoint method, which is a method of enhancing a system performance by not interrupting other transactions even for a moment at the time of doing checkpoint.
2. Information Disclosure Statement
Among the conventional techniques which have been used in the present field, the transaction oriented checkpoint(TOC) method, transaction consistent checkpoint(TCC) method and action consistent checkpoint(ACC) method, etc. are methods in which while the checkpoints are carryied out, the performance of other transactions are interrupted, so they are excluded from consideration.
In a conventionally used fuzzy checkpoint method, errors are found that cancel a result of some transactions among already completed transactions, and these transactions are called dangling transactions. Error operation of this method will be described in detail below.
The fuzzy checkpoint is a method which asynchronously performs normal transactions and a checkpoint to improve the system performance. This method, first of all, records(logging) a checkpoint start log record at the time of carrying out the checkpoint, then finally records a checkpoint end log record after performing required operations, and updates/records master pages for supporting the recovery function there terminating the checkpoint process. The method checks a transaction table in the process of performing the checkpoint, collects the currently on-going (completion prepared state or completion not prepared state) transactions, writes the transactions on a transaction list of check point end log record, and logs the log record. If the check operation of transaction table is per formed without interleaving the normal transactions, the operation is precisely performed. However, in the fuzzy checkpoint, other cases can occur. For example, the performance of fuzzy checkpoint and the transaction T.sub.-- i can cause interference as in a scenario shown below.
1. Checkpoint process logged the checkpoint start log record. PA0 2. Checkpoint process checks the status of transaction T.sub.-- i at transaction table, registers the transaction list, and thereafter checks the status of other transaction T.sub.-- j. PA0 3. Since a context switching occurs, a process which performs transation T.sub.-- i is performed, and T.sub.-- i logged the transaction end log record. PA0 4. Checkpoint process resumes again, completes the checks of remaining entries at the transaction table to complete the checkpoint end log record, and records the log record to the log file. PA0 5. Checkpoint process changes the pages. PA0 6. Power failure occurred.
In the above example, the recovery function performance from the system failure(power failure) is as follows. First, at the analysis, log records are analysed from the checkpoint start log record of the last completed checkpoint, and if the transaction end log record of the transation T.sub.-- i is encountered the item of T.sub.-- i is removed from the transaction table. Thereafter, if the checkpoint end log record is encountered, the item of T.sub.-- i is registered again on the transaction table in the condition of T.sub.-- i(completion prepared condition or completion not prepared condition) written on the transaction list of the log record. The log record about the transaction T.sub.-- i does not appear after the checkpoint end log record. Therefore, upon completion of the analysis step of recovery function, T.sub.-- i is specified according to the status at the time when the checkpoint process checks the condition of T.sub.-- i on the transaction table. T.sub.-- i is specified as a transaction to be entirely rollbacked if the condition is completion not prepared condition, and as a completion prepared transaction if the condition is completion prepared condition. In case of being specified as a transaction to be entirely rollbacked, the transaction T.sub.-- i is forcible aborted by undoing all undoable log records sequencially(in the order of opposite direction to the log)from the last log record of T.sub.-- i which was checked at the time of performing the checkpoint at the undo step of recovery function. That is, the already terminated(completed or entirely rollbacked) transaction is cancelled from an intermediate state of the transaction or is made to be in completion prepared condition, therefore, the property of atomicity, consistency and durability of the transaction are not guaranteed. These transactions T.sub.-- i are called dangling transactions, and an error exist that dangling transactions occur in conventional Fox checkpoint method.